import getters from "../getters";

const getDefaultState = () => {
    return {
        messageList: [],
    };
};

const state = getDefaultState();

const mutations = {
    receive: (state, message) => {
        state.messageList.push(message);
    },
};

const actions = {
    receive({ commit }, message) {
        commit("receive", message)
    }
}


export default {
    namespaced: true,
    state,
    mutations,
    actions,
    getters
};